package gui;

import java.awt.Image;
import java.io.IOException;
import java.io.InputStream;

import javax.imageio.ImageIO;

public class IconFactory {
	public Image getConnectedIcon(){
		String relativePath = "/icons/connected.gif";
		return getImage(relativePath);
	}
	
	public Image getDisconnectedIcon(){
		String relativePath = "/icons/disconnected.gif";
		return getImage(relativePath);
	}
	
	
	private Image getImage(String relativePath)
	{
		Image image = null;
		try {
			InputStream in = getClass().getResourceAsStream(relativePath);
			image = ImageIO.read(in);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return image;
	}
}
